{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "6543a19e-f04b-4d32-8c26-476931cbbbda",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from mindspore import context\n",
    "from mindsponge import Sponge\n",
    "from mindsponge import Molecule\n",
    "from mindsponge import ForceFieldBase\n",
    "from mindsponge import UpdaterMD\n",
    "\n",
    "from mindsponge.potential import BondEnergy, AngleEnergy\n",
    "from mindsponge.callback import WriteH5MD, RunInfo\n",
    "from mindsponge.function import VelocityGenerator"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "a35b79c3-9560-430a-a6f1-c72b820e7b9d",
   "metadata": {},
   "source": [
    "## 图模式选择与GPU选择\n",
    "\n",
    "一般情况下，使用MindSpore的静态图模式GRAPH_MODE会取得更好的速度增益，而动态图模式PYNATIVE_MODE更多的被用于进行Debug。在硬件平台上，如果没有华为的Ascend专用硬件，一般都是在GPU上运行，才有一定的速度保障。如果有多张卡，可以通过device_id进行选择。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6f876c41-e1d6-4a32-8f96-0e6cd26e559e",
   "metadata": {},
   "outputs": [],
   "source": [
    "context.set_context(mode=context.GRAPH_MODE, device_target=\"GPU\")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "ecededb8-a743-413e-b5d0-11eec3436e88",
   "metadata": {},
   "source": [
    "## 创建分子对象\n",
    "\n",
    "一个分子，可以是三个原子组成的水分子，也可以是上万个原子组成的蛋白质。在MindSPONGE中，为不同类型的分子提供了多种定义形式。当定义一个小体系$H_2O$时，我们可以直接用常规的列表来定义分子中所包含的原子种类、原子坐标以及键连信息等。在后续的案例中我们也会讲到，还可以通过配置文件等方式来进行定义，这两种方式都是支持的。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "ebdee15c-926a-4c59-9ff9-50625798762f",
   "metadata": {},
   "outputs": [],
   "source": [
    "system = Molecule(atoms=['O', 'H', 'H'],\n",
    "                  coordinate=[[0, 0, 0], [0.1, 0, 0], [-0.0333, 0.0943, 0]],\n",
    "                  bonds=[[[0, 1], [0, 2]]])"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "ebd0e9a7-5b52-4e98-b6e1-c39ec069a8ae",
   "metadata": {},
   "source": [
    "## 能量项定义\n",
    "\n",
    "不同的分子体系会有不同的能量项的需求。比如当前定义的$H_2O$分子，因为只有3个原子，因此涉及到的能量项只有近程相互作用中的键相互作用和角相互作用：\n",
    "\n",
    "$$\n",
    "E_{bond}=\\frac{1}{2}k_b(l-l_0)^2\\\\\n",
    "E_{angle}=\\frac{1}{2}k_a(a-a_0)^2\n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "87adb0e2-79e1-4f8a-be8d-f9692fd1e1d0",
   "metadata": {},
   "outputs": [],
   "source": [
    "bond_energy = BondEnergy(index=system.bonds,\n",
    "                         force_constant=[[345000, 345000]],\n",
    "                         bond_length=[[0.1, 0.1]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "63c9db0d-91ce-4e34-8470-aadd27218194",
   "metadata": {},
   "outputs": [],
   "source": [
    "angle_energy = AngleEnergy(index=[[1, 0, 2]],\n",
    "                           force_constant=[[383]],\n",
    "                           bond_angle=[[109.47 / 180 * np.pi]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "6d232d05-edf6-4593-ac40-aecf0e562e1c",
   "metadata": {},
   "outputs": [],
   "source": [
    "potential = ForceFieldBase(energy=[bond_energy, angle_energy])"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "c3afb783-e6a4-4bdf-9e2a-21f02412c3f6",
   "metadata": {},
   "source": [
    "## 速度生成器\n",
    "\n",
    "根据指定的温度，我们可以计算出系统平均运动动能，进而通过标准正态分布生成随机的一组原子运动速度，用于初始化系统。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "20adeb34-0636-498b-a6ba-fcb23902136d",
   "metadata": {},
   "outputs": [],
   "source": [
    "vgen = VelocityGenerator(300)\n",
    "velocity = vgen(system.shape, system.atom_mass)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "272fec0d-9eb4-4882-a886-00aad2cb3941",
   "metadata": {},
   "source": [
    "## 分子动力学更新器\n",
    "\n",
    "如果不对系统施加任何的限制，任由系统去演化的话，就只需要配置integrator积分器，常见的算法有LeapFrog与VelocityVerlet，在MindSPONGE的control中都是支持的。通过前面配置的各项势能项，利用MindSpore框架的自动微分，就可以计算出当前受力以及下一步的位移，进而实现分子系统的演化。\n",
    "\n",
    "如果需要对系统施加以一定的控制，比如控制系统的温度，或者是控制系统的压强，在MindSPONGE的control中可以调用BerendsenThermostat、Barostat等算法，来跑一个NVT的系统，避免系统演化中可能出现的温度震荡现象。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "c411534c-1ac0-42a3-93b8-cf140d89cf49",
   "metadata": {},
   "outputs": [],
   "source": [
    "opt = UpdaterMD(system=system,\n",
    "                time_step=1e-3,\n",
    "                velocity=velocity,\n",
    "                integrator='leap_frog',\n",
    "                temperature=300,\n",
    "                thermostat='berendsen',)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "d7433369-20e8-4caa-bcce-195a803ba4e8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[MindSPONGE] Using fully connected neighbour list (not updated).\n"
     ]
    }
   ],
   "source": [
    "md = Sponge(system, potential, opt)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "d1e2217a-5e76-4ef1-82e6-cda9cbe9b8d7",
   "metadata": {},
   "source": [
    "## 信息回调\n",
    "\n",
    "基于MindSpore的信息回调系统CallBack，我们可以创建一些符合自己需求的信息回调机制，比如使用RunInfo在屏幕上对系统能量进行输出，或者是通过WriteH5MD将轨迹输出到hdf5/h5md文件中。\n",
    "\n",
    "关于h5md格式的轨迹输出，可以使用改进版的VMD-h5mdplugin进行可视化，相关安装和说明链接为：https://gitee.com/helloyesterday/VMD-h5mdplugin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "c84061d8-c1dc-425f-9145-494eacf7f126",
   "metadata": {},
   "outputs": [],
   "source": [
    "run_info = RunInfo(10)\n",
    "cb_h5md = WriteH5MD(system, 'tutorial_b01.h5md', save_freq=10, write_velocity=True, write_force=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "924cfb6b-d196-4ecb-bf75-cecd3810a496",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[MindSPONGE] Started simulation at 2023-06-30 16:21:43\n",
      "[MindSPONGE] Step: 0, E_pot: 3.2556585e-05, E_kin: 8.64085, E_tot: 8.6408825, Temperature: 346.4185\n",
      "[MindSPONGE] Step: 10, E_pot: 0.109458, E_kin: 8.23973, E_tot: 8.349188, Temperature: 330.33725\n",
      "[MindSPONGE] Step: 20, E_pot: 0.6717049, E_kin: 7.389155, E_tot: 8.06086, Temperature: 296.23703\n",
      "[MindSPONGE] Step: 30, E_pot: 1.2070246, E_kin: 6.753634, E_tot: 7.9606586, Temperature: 270.7585\n",
      "[MindSPONGE] Step: 40, E_pot: 2.3268845, E_kin: 5.6236567, E_tot: 7.9505415, Temperature: 225.45682\n",
      "[MindSPONGE] Step: 50, E_pot: 2.7738693, E_kin: 5.36751, E_tot: 8.141379, Temperature: 215.18768\n",
      "[MindSPONGE] Step: 60, E_pot: 3.764573, E_kin: 4.6687517, E_tot: 8.433325, Temperature: 187.17392\n",
      "[MindSPONGE] Step: 70, E_pot: 3.5893805, E_kin: 5.111702, E_tot: 8.701082, Temperature: 204.93216\n",
      "[MindSPONGE] Step: 80, E_pot: 3.9743938, E_kin: 5.067531, E_tot: 9.041925, Temperature: 203.1613\n",
      "[MindSPONGE] Step: 90, E_pot: 3.359784, E_kin: 5.74121, E_tot: 9.100994, Temperature: 230.16963\n",
      "[MindSPONGE] Step: 100, E_pot: 3.2974706, E_kin: 5.986242, E_tot: 9.283712, Temperature: 239.99313\n",
      "[MindSPONGE] Step: 110, E_pot: 3.0257397, E_kin: 6.1115093, E_tot: 9.137249, Temperature: 245.0152\n",
      "[MindSPONGE] Step: 120, E_pot: 2.90655, E_kin: 6.2994685, E_tot: 9.206018, Temperature: 252.55063\n",
      "[MindSPONGE] Step: 130, E_pot: 3.5212293, E_kin: 5.5753565, E_tot: 9.096586, Temperature: 223.52043\n",
      "[MindSPONGE] Step: 140, E_pot: 3.4824035, E_kin: 5.7019997, E_tot: 9.184403, Temperature: 228.59766\n",
      "[MindSPONGE] Step: 150, E_pot: 4.8143735, E_kin: 4.48185, E_tot: 9.296224, Temperature: 179.6809\n",
      "[MindSPONGE] Step: 160, E_pot: 4.7678394, E_kin: 4.6974206, E_tot: 9.46526, Temperature: 188.32329\n",
      "[MindSPONGE] Step: 170, E_pot: 6.1736493, E_kin: 3.6144183, E_tot: 9.788068, Temperature: 144.90488\n",
      "[MindSPONGE] Step: 180, E_pot: 5.976805, E_kin: 4.0580807, E_tot: 10.034885, Temperature: 162.69165\n",
      "[MindSPONGE] Step: 190, E_pot: 6.88971, E_kin: 3.5404592, E_tot: 10.430169, Temperature: 141.93979\n",
      "[MindSPONGE] Step: 200, E_pot: 6.4385123, E_kin: 4.276209, E_tot: 10.714722, Temperature: 171.43658\n",
      "[MindSPONGE] Step: 210, E_pot: 6.7534204, E_kin: 4.3104773, E_tot: 11.063898, Temperature: 172.81042\n",
      "[MindSPONGE] Step: 220, E_pot: 6.0528116, E_kin: 5.2847323, E_tot: 11.3375435, Temperature: 211.86908\n",
      "[MindSPONGE] Step: 230, E_pot: 6.0029764, E_kin: 5.628819, E_tot: 11.631796, Temperature: 225.66379\n",
      "[MindSPONGE] Step: 240, E_pot: 5.1346626, E_kin: 6.687979, E_tot: 11.822641, Temperature: 268.12634\n",
      "[MindSPONGE] Step: 250, E_pot: 4.8814383, E_kin: 7.178783, E_tot: 12.060221, Temperature: 287.80304\n",
      "[MindSPONGE] Step: 260, E_pot: 4.0301647, E_kin: 8.004445, E_tot: 12.03461, Temperature: 320.90448\n",
      "[MindSPONGE] Step: 270, E_pot: 3.5908458, E_kin: 8.540309, E_tot: 12.131155, Temperature: 342.3877\n",
      "[MindSPONGE] Step: 280, E_pot: 3.1532786, E_kin: 8.66868, E_tot: 11.821959, Temperature: 347.53418\n",
      "[MindSPONGE] Step: 290, E_pot: 2.564608, E_kin: 9.188936, E_tot: 11.753544, Temperature: 368.39166\n",
      "[MindSPONGE] Step: 300, E_pot: 2.878861, E_kin: 8.457624, E_tot: 11.336485, Temperature: 339.0728\n",
      "[MindSPONGE] Step: 310, E_pot: 2.1270618, E_kin: 9.088549, E_tot: 11.2156105, Temperature: 364.36707\n",
      "[MindSPONGE] Step: 320, E_pot: 2.9692912, E_kin: 7.9980736, E_tot: 10.967365, Temperature: 320.64905\n",
      "[MindSPONGE] Step: 330, E_pot: 1.967066, E_kin: 8.885353, E_tot: 10.852419, Temperature: 356.2208\n",
      "[MindSPONGE] Step: 340, E_pot: 2.6869407, E_kin: 8.144304, E_tot: 10.831245, Temperature: 326.51157\n",
      "[MindSPONGE] Step: 350, E_pot: 1.551012, E_kin: 9.085359, E_tot: 10.636371, Temperature: 364.23917\n",
      "[MindSPONGE] Step: 360, E_pot: 1.798593, E_kin: 8.872072, E_tot: 10.670666, Temperature: 355.68835\n",
      "[MindSPONGE] Step: 370, E_pot: 0.9469536, E_kin: 9.396958, E_tot: 10.343912, Temperature: 376.73145\n",
      "[MindSPONGE] Step: 380, E_pot: 0.9562708, E_kin: 9.340242, E_tot: 10.296514, Temperature: 374.45764\n",
      "[MindSPONGE] Step: 390, E_pot: 0.784455, E_kin: 9.1568165, E_tot: 9.941272, Temperature: 367.10397\n",
      "[MindSPONGE] Step: 400, E_pot: 0.93679076, E_kin: 8.9130745, E_tot: 9.849865, Temperature: 357.33215\n",
      "[MindSPONGE] Step: 410, E_pot: 1.4908533, E_kin: 8.138921, E_tot: 9.629774, Temperature: 326.29575\n",
      "[MindSPONGE] Step: 420, E_pot: 1.8076464, E_kin: 7.8111315, E_tot: 9.618778, Temperature: 313.1544\n",
      "[MindSPONGE] Step: 430, E_pot: 2.7599163, E_kin: 6.8416853, E_tot: 9.601602, Temperature: 274.28854\n",
      "[MindSPONGE] Step: 440, E_pot: 2.8436575, E_kin: 6.863937, E_tot: 9.707594, Temperature: 275.1806\n",
      "[MindSPONGE] Step: 450, E_pot: 3.7439682, E_kin: 6.038392, E_tot: 9.78236, Temperature: 242.08388\n",
      "[MindSPONGE] Step: 460, E_pot: 3.2610958, E_kin: 6.621831, E_tot: 9.882927, Temperature: 265.47443\n",
      "[MindSPONGE] Step: 470, E_pot: 3.9299364, E_kin: 5.937754, E_tot: 9.867691, Temperature: 238.04922\n",
      "[MindSPONGE] Step: 480, E_pot: 3.1292224, E_kin: 6.7278676, E_tot: 9.85709, Temperature: 269.72552\n",
      "[MindSPONGE] Step: 490, E_pot: 3.7694664, E_kin: 5.991239, E_tot: 9.760706, Temperature: 240.1935\n",
      "[MindSPONGE] Step: 500, E_pot: 3.2591598, E_kin: 6.474494, E_tot: 9.733654, Temperature: 259.56757\n",
      "[MindSPONGE] Step: 510, E_pot: 4.030336, E_kin: 5.752072, E_tot: 9.782408, Temperature: 230.60509\n",
      "[MindSPONGE] Step: 520, E_pot: 4.0972424, E_kin: 5.802803, E_tot: 9.900045, Temperature: 232.63893\n",
      "[MindSPONGE] Step: 530, E_pot: 4.7654877, E_kin: 5.442219, E_tot: 10.207706, Temperature: 218.18283\n",
      "[MindSPONGE] Step: 540, E_pot: 5.233107, E_kin: 5.235046, E_tot: 10.468153, Temperature: 209.8771\n",
      "[MindSPONGE] Step: 550, E_pot: 5.45544, E_kin: 5.4141917, E_tot: 10.869632, Temperature: 217.0592\n",
      "[MindSPONGE] Step: 560, E_pot: 6.0663967, E_kin: 5.0919185, E_tot: 11.158316, Temperature: 204.139\n",
      "[MindSPONGE] Step: 570, E_pot: 5.75101, E_kin: 5.7071986, E_tot: 11.458208, Temperature: 228.80608\n",
      "[MindSPONGE] Step: 580, E_pot: 6.3283134, E_kin: 5.3931584, E_tot: 11.721472, Temperature: 216.21596\n",
      "[MindSPONGE] Step: 590, E_pot: 5.533611, E_kin: 6.3529043, E_tot: 11.886515, Temperature: 254.69293\n",
      "[MindSPONGE] Step: 600, E_pot: 5.8806677, E_kin: 6.231468, E_tot: 12.112136, Temperature: 249.82446\n",
      "[MindSPONGE] Step: 610, E_pot: 4.709663, E_kin: 7.455316, E_tot: 12.164979, Temperature: 298.88947\n",
      "[MindSPONGE] Step: 620, E_pot: 4.6702356, E_kin: 7.616868, E_tot: 12.287104, Temperature: 305.3662\n",
      "[MindSPONGE] Step: 630, E_pot: 3.4238777, E_kin: 8.786201, E_tot: 12.210078, Temperature: 352.2457\n",
      "[MindSPONGE] Step: 640, E_pot: 3.0485957, E_kin: 9.102716, E_tot: 12.151312, Temperature: 364.93506\n",
      "[MindSPONGE] Step: 650, E_pot: 2.2008495, E_kin: 9.734536, E_tot: 11.935386, Temperature: 390.2652\n",
      "[MindSPONGE] Step: 660, E_pot: 1.7730435, E_kin: 9.94134, E_tot: 11.714384, Temperature: 398.55615\n",
      "[MindSPONGE] Step: 670, E_pot: 1.6672523, E_kin: 9.758498, E_tot: 11.425751, Temperature: 391.22586\n",
      "[MindSPONGE] Step: 680, E_pot: 1.5058689, E_kin: 9.694256, E_tot: 11.200125, Temperature: 388.65033\n",
      "[MindSPONGE] Step: 690, E_pot: 2.1046214, E_kin: 8.887058, E_tot: 10.99168, Temperature: 356.28915\n",
      "[MindSPONGE] Step: 700, E_pot: 2.1714725, E_kin: 8.78501, E_tot: 10.956483, Temperature: 352.19797\n",
      "[MindSPONGE] Step: 710, E_pot: 3.0212188, E_kin: 7.929592, E_tot: 10.950811, Temperature: 317.90356\n",
      "[MindSPONGE] Step: 720, E_pot: 2.7938452, E_kin: 8.301775, E_tot: 11.09562, Temperature: 332.8247\n",
      "[MindSPONGE] Step: 730, E_pot: 3.3314648, E_kin: 7.874297, E_tot: 11.205762, Temperature: 315.68677\n",
      "[MindSPONGE] Step: 740, E_pot: 2.3878574, E_kin: 8.850435, E_tot: 11.238293, Temperature: 354.8209\n",
      "[MindSPONGE] Step: 750, E_pot: 2.470553, E_kin: 8.7686825, E_tot: 11.239235, Temperature: 351.5434\n",
      "[MindSPONGE] Step: 760, E_pot: 1.1632016, E_kin: 9.739005, E_tot: 10.902206, Temperature: 390.44437\n",
      "[MindSPONGE] Step: 770, E_pot: 1.1281078, E_kin: 9.607565, E_tot: 10.735673, Temperature: 385.17484\n",
      "[MindSPONGE] Step: 780, E_pot: 0.36987874, E_kin: 9.752372, E_tot: 10.122251, Temperature: 390.98026\n",
      "[MindSPONGE] Step: 790, E_pot: 0.47850418, E_kin: 9.476047, E_tot: 9.954551, Temperature: 379.90216\n",
      "[MindSPONGE] Step: 800, E_pot: 0.87899077, E_kin: 8.51518, E_tot: 9.394171, Temperature: 341.38025\n",
      "[MindSPONGE] Step: 810, E_pot: 1.0416663, E_kin: 8.317303, E_tot: 9.358969, Temperature: 333.4472\n",
      "[MindSPONGE] Step: 820, E_pot: 2.4280071, E_kin: 6.6635737, E_tot: 9.091581, Temperature: 267.1479\n",
      "[MindSPONGE] Step: 830, E_pot: 2.5061595, E_kin: 6.6707754, E_tot: 9.176935, Temperature: 267.43665\n",
      "[MindSPONGE] Step: 840, E_pot: 4.1993604, E_kin: 5.026842, E_tot: 9.226202, Temperature: 201.53004\n",
      "[MindSPONGE] Step: 850, E_pot: 4.1565604, E_kin: 5.236617, E_tot: 9.393177, Temperature: 209.9401\n",
      "[MindSPONGE] Step: 860, E_pot: 5.5282784, E_kin: 4.1157436, E_tot: 9.644022, Temperature: 165.00339\n",
      "[MindSPONGE] Step: 870, E_pot: 5.287362, E_kin: 4.5935163, E_tot: 9.880878, Temperature: 184.15768\n",
      "[MindSPONGE] Step: 880, E_pot: 6.1146054, E_kin: 4.076517, E_tot: 10.191122, Temperature: 163.43077\n",
      "[MindSPONGE] Step: 890, E_pot: 5.5660977, E_kin: 4.9034986, E_tot: 10.469597, Temperature: 196.58511\n",
      "[MindSPONGE] Step: 900, E_pot: 5.9964848, E_kin: 4.758069, E_tot: 10.754554, Temperature: 190.75473\n",
      "[MindSPONGE] Step: 910, E_pot: 5.1473656, E_kin: 5.8503356, E_tot: 10.997702, Temperature: 234.54456\n",
      "[MindSPONGE] Step: 920, E_pot: 5.3689394, E_kin: 5.8585424, E_tot: 11.227482, Temperature: 234.87357\n",
      "[MindSPONGE] Step: 930, E_pot: 4.454411, E_kin: 6.854491, E_tot: 11.308903, Temperature: 274.80194\n",
      "[MindSPONGE] Step: 940, E_pot: 4.5033665, E_kin: 6.9501147, E_tot: 11.453482, Temperature: 278.63556\n",
      "[MindSPONGE] Step: 950, E_pot: 3.990395, E_kin: 7.310233, E_tot: 11.300629, Temperature: 293.073\n",
      "[MindSPONGE] Step: 960, E_pot: 3.8753312, E_kin: 7.496028, E_tot: 11.371359, Temperature: 300.52167\n",
      "[MindSPONGE] Step: 970, E_pot: 4.1371503, E_kin: 6.9828615, E_tot: 11.120012, Temperature: 279.9484\n",
      "[MindSPONGE] Step: 980, E_pot: 3.8881712, E_kin: 7.335414, E_tot: 11.223585, Temperature: 294.08252\n",
      "[MindSPONGE] Step: 990, E_pot: 4.7241354, E_kin: 6.411559, E_tot: 11.1356945, Temperature: 257.04443\n",
      "[MindSPONGE] Finished simulation at 2023-06-30 16:21:49\n",
      "[MindSPONGE] Simulation time: 6.37 seconds.\n",
      "--------------------------------------------------------------------------------\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<mindsponge.core.sponge.Sponge at 0x7f2ba7187bb0>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "md.run(1000, callbacks=[run_info, cb_h5md])"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "e0bfd201-98dd-4326-bb4b-5300ae1db0d0",
   "metadata": {},
   "source": [
    "上述运行结果的轨迹输出如下图所示，该结果展示使用了VMD-h5mdplugin插件，在VMD中对分子运行轨迹进行了可视化。\n",
    "\n",
    "![](../../docs/tutorial_b01.gif)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "mindspore-1.9",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  },
  "vscode": {
   "interpreter": {
    "hash": "768f82fbbece3f0acd424cda825de8aa44edbfaa38d8a3df4ff1437f7ae7861f"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
